import request from '@/utils/request'

// 查询获奖证书列表
export function listAward(query) {
  return request({
    url: '/work/libraryaward/list',
    method: 'get',
    params: query
  })
}

// 查询获奖证书详细
export function getAward(id) {
  return request({
    url: '/work/libraryaward/' + id,
    method: 'get'
  })
}

// 新增获奖证书
export function addAward(data) {
  return request({
    url: '/work/libraryaward/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 修改获奖证书
export function updateAward(data) {
  return request({
    url: '/work/libraryaward/saveOrUpdate',
    method: 'post',
    data: data
  })
}

// 删除获奖证书
export function delAward(id) {
  return request({
    url: '/work/libraryaward/delete-by-id',
    method: 'get',
    params: { "id": id }
  })
}

export function delAwards(ids) {
  return request({
    url: '/work/libraryaward/delete-by-ids',
    method: 'get',
    params: { "ids": ids }
  })
}
